package br.edu.intec.exercicio01.classes;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

public class ArquivoUtil {
	
	public static BufferedReader lerArquivo(String path) throws Exception{
		
		File file = null;
		FileReader reader = null;
		BufferedReader br = null;
		
		try{
			
			file = new File(path);
			reader = new FileReader(file);
			br = new BufferedReader(reader);
			
		} catch(FileNotFoundException io){
			
			throw new FileNotFoundException("Erro, verifique o arquivo cardapio.txt");
			
		} 
		
		return br;
		
	}

}
